//
// Created by ECNU on 2024/2/20.
//

#ifndef NANO_FAISS_METRICTYPE_H
#define NANO_FAISS_METRICTYPE_H

#include <nanofaiss/impl/platform_macros.h>

namespace faiss {

enum class MetricType {
    METRIC_INNER_PRODUCT,
    METRIC_COSINE,
    METRIC_L2,
    METRIC_L1,
};

using idx_t = int64_t;

// constexpr => inline => enable multi-definition
constexpr bool is_similarity_metric(MetricType type) {
    return type == MetricType::METRIC_INNER_PRODUCT;
}

}

#endif // NANO_FAISS_METRICTYPE_H
